﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ProgramacionRedes {
    public partial class FrmLogin : Form {
        Login login;

        public FrmLogin(Login login) {
            InitializeComponent();
            this.login = login;
            txt_Usuario.Text = login.NombreUsuario;
            txt_Clave.Text = login.Clave;
        }

        private void btn_Aceptar_Click(object sender, EventArgs e) {
            login.NombreUsuario = txt_Usuario.Text;
            login.Clave = txt_Clave.Text;
            login.Cancelado = false;
            Close();
        }

        private void btn_Cancelar_Click(object sender, EventArgs e) {
            login.Cancelado = true;
            Close();
        }
    }
}
